package com.zhentao.controller;

import com.zhentao.domain.SysReservation;
import com.zhentao.domain.vo.Result;
import com.zhentao.service.SysReservationService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/reservation")
@Tag(name = "预约管理")
public class ReservationController {
    @Autowired
    private SysReservationService sysReservationService;

    @PostMapping("/saveReservation")
    @Operation(summary = "保存预约信息")
    public Result saveReservation(@RequestBody SysReservation savedReservation) {
        return sysReservationService.saveReservation(savedReservation);
    }
    @PostMapping("/ReservationTime")
    @Operation(summary = "查询预约时间")
    public Result ReservationTime(String uuid) {
        return sysReservationService.ReservationTime(uuid);
    }
//    查询预约信息
    @PostMapping("/getReservation")
    public Result getReservation() {
        return sysReservationService.getReservation();
    }

}
